hysop.backend.host.python.operator.spatial_filtering module¶
- class hysop.backend.host.python.operator.spatial_filtering.PythonPolynomialInterpolationFilter(input_field, output_field, input_topo, output_topo, **kwds)[source]¶
Bases:
PolynomialInterpolationFilterBase
,HostOperator
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- discretize(**kwds)[source]¶
By default, an operator discretize all its variables. For each input continuous field that is also an output field, input topology may be different from the output topology.
After this call, one can access self.input_discrete_fields and self.output_discrete_fields, which contains input and output dicretised fields mapped by continuous fields.
self.discrete_fields will be a tuple containing all input and output discrete fields.
Discrete tensor fields are built back from discretized scalar fields and are accessible from self.input_tensor_fields, self.output_tensor_fields and self.discrete_tensor_fields like their scalar counterpart.
- class hysop.backend.host.python.operator.spatial_filtering.PythonPolynomialRestrictionFilter(input_field, output_field, input_topo, output_topo, **kwds)[source]¶
Bases:
PolynomialRestrictionFilterBase
,HostOperator
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- discretize(**kwds)[source]¶
By default, an operator discretize all its variables. For each input continuous field that is also an output field, input topology may be different from the output topology.
After this call, one can access self.input_discrete_fields and self.output_discrete_fields, which contains input and output dicretised fields mapped by continuous fields.
self.discrete_fields will be a tuple containing all input and output discrete fields.
Discrete tensor fields are built back from discretized scalar fields and are accessible from self.input_tensor_fields, self.output_tensor_fields and self.discrete_tensor_fields like their scalar counterpart.
- class hysop.backend.host.python.operator.spatial_filtering.PythonRemeshRestrictionFilter(input_field, output_field, input_topo, output_topo, **kwds)[source]¶
Bases:
RemeshRestrictionFilterBase
,HostOperator
Python implementation for lowpass spatial filtering: small grid -> coarse grid using remeshing kernels.
Create the common attributes of all host operators.
All input and output variable topologies should be of kind Backend.HOST and share the same HostEnvironment.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- setup(**kwds)[source]¶
Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().
Automatically honour temporary field memory requests.
- class hysop.backend.host.python.operator.spatial_filtering.PythonSpectralRestrictionFilter(plot_input_energy=None, plot_output_energy=None, **kwds)[source]¶
Bases:
SpectralRestrictionFilterBase
,HostOperator
Python implementation for lowpass spatial filtering: small grid -> coarse grid using the spectral method.
Initialize a SpectralRestrictionFilterBase.
- Parameters:
Notes
- IOParams filename is formatted before being used:
{fname} is replaced with field name {ite} is replaced with simulation iteration id
If None is passed, no plots are generated.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- class hysop.backend.host.python.operator.spatial_filtering.PythonSubgridRestrictionFilter(input_field, output_field, input_topo, output_topo, **kwds)[source]¶
Bases:
SubgridRestrictionFilterBase
,HostOperator
Python implementation for lowpass spatial filtering: small grid -> coarse grid byt just taking subpoints.
Create the common attributes of all host operators.
All input and output variable topologies should be of kind Backend.HOST and share the same HostEnvironment.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).